<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">

    <title th:replace="${title}">博客</title>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>

    <link th:href="@{/lib/editormd/css/editormd.min.css}" rel="stylesheet" href="../static/lib/editormd/css/editormd.min.css">
    <link th:href="@{/css/me.css}" rel="stylesheet" href="../static/css/me.css">
    <link th:href="@{/css/typo.css}" rel="stylesheet" href="../static/css/typo.css">
    <link th:href="@{/lib/prism/prism.css}" rel="stylesheet" href="../static/lib/prism/prism.css">

    <link rel="icon" th:href="@{/images/tou.ico}" href="./image/png_icon.png">
</head>
<body>

<!--导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">管理后台</h2>

            <a th:href="@{/admin/blogs}" href="#" class="m-item item m-mobile-hide" th:classappend="${n==1} ? 'active'"><i class="home icon"></i>博客</a>
            <a th:href="@{/admin/types}" href="#" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i class="home icon"></i>分类</a>
            <a th:href="@{/admin/tags}" href="#" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><i class="tags icon"></i>标签</a>

            <div class="right m-item  m-mobile-hide menu">
                <div class="ui dropdown item">
                    <div class="text">
                        <img th:src="${session.user.picture}" src="https://unsplash.it/100/100?image=1005" alt="" class="ui avatar image">
                        <span th:text="${session.user.nickname}">王建凯</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a th:href="@{/admin/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <a href="#" class="ui menu toggle black icon button m-top-right m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<!--底部-->
<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="item">
                    <img th:src="@{/images/ewm.jpg}" src="../static/images/ewm.jpg" class="ui centered rounded image"
                         alt="" style="width:170px">
                </div>
            </div>
            <!--<div class="three wide column">
                <h4 class="ui inverted header">最新博客</h4>
                <div id="newBlog-container">

                </div>
                <div th:fragment="newBlogList" class="ui inverted link list">
                    <a th:each="blog : ${newBlogs}" th:text="${blog.title}" th:href="@{/blogs/{id}(id=${blog.id})}" href="#" class="item">用户故事</a>
                    &lt;!&ndash;/*&ndash;&gt;
                    <a href="#" class="item">用户故事</a>
                    <a href="#" class="item">用户故事</a>
                    &lt;!&ndash;*/&ndash;&gt;
                </div>
            </div>-->
            <div class="six wide column">
                <h4 class="ui inverted header">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">Email:w17733607665@163.com</a>
                    <a href="#" class="item">qq:1529866506</a>
                    <a href="#" class="item">wechat:Wangjkqingchiyao</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header">BLog</h4>
                <div class="ui inverted link list">
                    <p>这是我的个人博客,会分享写作、编程、思考相关的任何内容，希望可以给来到这的人有所帮助......</p>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin">Copyright © 2023 等风个人博客 | | Theme By Specs</p>
    </div>
</footer>

<th:block th:fragment="script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.3/jquery.scrollTo.min.js"></script>

    <script th:src="@{/lib/qrcode/qrcode.min.js}" src="../static/lib/qrcode/qrcode.min.js"></script>
    <script th:src="@{/lib/prism/prism.js}" src="../static/lib/prism/prism.js"></script>
    <script th:src="@{/lib/waypoints/jquery.waypoints.min.js}" src="../static/lib/waypoints/jquery.waypoints.min.js"></script>
    <script th:src="@{/lib/editormd/editormd.min.js}" src="/static/lib/editormd/editormd.min.js"></script>
</th:block>
</body>
</html>